﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;


namespace IEstate.Web.Models
{
    public class SearchViewModel
    {
        public string Street { get; set; }
        public int BedRooms { get; set; }

        [Required(ErrorMessage = "Please specify min price")]
        [RegularExpression("^[0-9]+$")]
        public decimal? MinPrice { get; set; }

        [Required(ErrorMessage = "Please specify max price")]
        [RegularExpression("^[0-9]+$")]
        public decimal? MaxPrice { get; set; }

        [Required(ErrorMessage = "Please specify min size")]
        [RegularExpression("^[0-9]+$")]
        public decimal? MinSize { get; set; }

        [Required(ErrorMessage = "Please specify max size")]
        [RegularExpression("^[0-9]+$")]
        public decimal? MaxSize { get; set; }
    }
}